﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WPFSchematics.Definition.Common
{
    /// <summary>
    /// 全局参数。
    /// </summary>
    public static class SystemConfig
    {
        /// <summary>
        /// 缓冲图像DPI值
        /// </summary>
        public static double BufferRenderDPI { get; set; }

        /// <summary>
        /// 是否绘制幻影。
        /// </summary>
        public static bool GhostDisplay { set; get; }
        /// <summary>
        /// 背景网格插值系数。（正整数。）
        /// </summary>
        public static int BackgroundGridInterpolationRadio { set; get; }
        /// <summary>
        /// 图元设备绘制模式。0,Drawing模式；1，Brush模式。
        /// </summary>
        public static int FeatureRenderMode { set; get; }
        /// <summary>
        /// 图元端子绘制模式。0,Drawing模式；1，Brush模式。
        /// </summary>
        public static int TerminalRenderMode { set; get; }
        /// <summary>
        /// 图元背景画笔放大系数。
        /// </summary>
        public static double BackgroundStrokeExpandRadio { set; get; }
        /// <summary>
        /// 分组框放大系数。
        /// </summary>
        public static double GroupBoundsExpandRadio { set; get; }
        /// <summary>
        /// 图元端子放大系数。
        /// </summary>
        public static double TerminalExpandRadio { get; set; }

        /// <summary>
        /// 图元外接矩形放大系数。
        /// </summary>
        public static double BackgroundBoundsExpandRadio { set; get; }

        /// <summary>
        /// 圆角矩形圆角比例。
        /// </summary>
        public static double BoundsRadius { set; get; }

        /// <summary>
        /// 布局节点间距。
        /// </summary>
        public static double NodeSpace { get; set; }

        /// <summary>
        /// 线型规范化系数。
        /// </summary>
        public static double LineRegularRadio { get; set; }

        /// <summary>
        /// 线型规范化端点最小距离。
        /// </summary>
        public static double LineRegularEndPointMisDistance { get; set; }

        /// <summary>
        /// 构造。
        /// </summary>
        static SystemConfig()
        {
            BufferRenderDPI = 96;
            GhostDisplay = true;
            BackgroundGridInterpolationRadio = 2;
            NodeSpace = 100;
            TerminalExpandRadio = 1.5;
            BackgroundBoundsExpandRadio = 0.01;
            GroupBoundsExpandRadio = .1;
            BoundsRadius = .1;
            BackgroundStrokeExpandRadio = .5;
            FeatureRenderMode = 0;
            TerminalRenderMode = 0;
            LineRegularRadio = 2;
            LineRegularEndPointMisDistance = 20;
        }
    }
}
